<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
$path = JURI::root()."images/image_category/thumb/";
?>
<?php foreach($this->items as $i => $item): ?>
	<tr class="row<?php echo $i % 2; ?>">
		<td>
			<?php echo $i+1; ?>
		</td>
		<td>
			<?php echo JHtml::_('grid.id', $i, $item->id); ?>
		</td>
		<td>
			<a href="<?php echo JRoute::_('index.php?option=com_shop&view=category&layout=edit&id='.$item->id); ?>">|<?php echo str_repeat('-- ',$item->level).$item->title; ?></a>
		</td>
        <td class="center">
					<?php echo JHtml::_('jgrid.published', $item->state, $i,'categories.'); ?>
		</td>
         <td class="center">
					<?php $home = (($item->home == 0) ?
                            " <a class=\"jgrid\" onclick=\"return listItemTask('cb".$i."','categories.home')\" href=\"javascript:void(0);\">
		                     <span class=\"state unpublish\"><span class=\"text\">Trang chủ</span></span></a>
                            " :
                            " <a class=\"jgrid\" onclick=\"return listItemTask('cb".$i."','categories.unhome')\" href=\"javascript:void(0);\">
		                     <span class=\"state publish\"><span class=\"text\">Không hiển thị trang chủ</span></span></a>
                            "); 
							echo $home;
							?>
		</td>
       <td class="order">
 <span><?php echo $this->pagination->orderUpIcon($i, true, 'categories.orderup', 'JLIB_HTML_MOVE_UP', true); ?></span>
 <span><?php echo $this->pagination->orderDownIcon($i, $this->pagination->total, true, 'categories.orderdown', 'JLIB_HTML_MOVE_DOWN', true); ?></span>
       <input type="text" name="order[]" size="5" value="<?php echo $item->ordering;?>"  class="text-area-order" />
       </td>
        <td>
        <img src="<?php echo $path.$item->image; ?>" width="60" />
        </td>
        <td class="center">
        	<?php echo $item->id; ?>
        </td>
	</tr>
<?php endforeach; ?>